import java.net.URL;

import mp3player.MP3Player;
import mp3player.MP3PlayerException;
import mp3player.MP3PlayerListener;

import com.sun.media.codec.audio.mp3.JavaDecoder;

public class Radio {
	
	public static void main(String[] args) {
		
		
		final MP3Player player = new MP3Player();
		player.addMP3PlayerListener(new MP3PlayerListener() {
			public void endOfMedia() {
				try {
					URL url = Radio.class.getResource("Meh Draeck.mp3");
					player.play(url);
				
				} catch (MP3PlayerException e) {
					
					e.printStackTrace();
				}
				
			}
			public void durationUpdate(long nanoseconds) {
				System.out.println(nanoseconds);
			}
		});
		try {
			URL url = Radio.class.getResource("Meh Draeck.mp3");
			player.play(url);
		
		} catch (MP3PlayerException e) {
			e.printStackTrace();
		}
		
		//RadioModel model = new RadioModel();
		//new RadioController(model);
		
		
		
	}

}
